/* 导入ip端口文件 */
import {
  ipConFig
} from '../utils/ipconfig'

// 首页模块
const indexApi = {
  //************homeApi*****************/
  //后端测调接口
  testApi: () => {
    return ipConFig + 'wxReq/testFun'
  },
  //服务类目
  severApi: () => {
    return ipConFig + 'homeApi/getServiceTypeAll'
  },
  // 搜索
  seaherApi: (name) => {
    return ipConFig + 'homeApi/searchProductClassifyByName?name=' + name
  },
  //轮播图
  bannerApi: () => {
    return ipConFig + 'homeApi/getBannerAll'
  },
  //************orderApi*****************/
  //用户下单
  releaseOrdersApi: (serviceTypeId) => {
    return ipConFig + 'orderApi/doOrder/' + serviceTypeId
  },
  //订单列表
  ordeApi: () => {
    return ipConFig + 'orderApi/getUserOrderAll'
  },
  //商品列表侧边类目
  productLeftApi: (id) => {
    return ipConFig + 'orderApi/getProductClassByServiceId?id=' + id
  },

  //商品列表右侧商品
  productRightApi: (id) => {
    return ipConFig + 'orderApi/getProductByClassId'
    // return ipConFig + 'orderApi/getProductByClassId?id=' + id
  },
  //************myApi*****************/
  //收货地址列表
  addressApi: () => {
    return ipConFig + 'myApi/addressAllForUser'
  },
  //新增收货地址
  addAddressApi: () => {
    return ipConFig + 'myApi/addressAddOrUpdate'
  },
  // 删除地址
  delAddressApi: () => {
    return ipConFig + 'myApi/addressDel'
  },
  //图片上传
  upLoadApi: () => {
    return ipConFig + 'common/upload'
  },
  //确认接单
  orderGrabbingApi: () => {
    return ipConFig + 'orderApi/reviceOrder'
  },
  //确认师傅接单
  confrimOrderApi: () => {
    return ipConFig + 'orderApi/confrimOrder'
  },

  // 全部消息
  allNews: () => {
    return ipConFig + 'messageApi/getAll'
  },
  //根据id清除消息
  clearNews: () => {
    return ipConFig + 'messageApi/updateReadById'
  },
  //全部清除消息
  clearAllNews: () => {
    return ipConFig + 'messageApi/updateAllRead'
  },
  //获取技能
  getSkillList: () => {
    return ipConFig + 'myApi/getSkillList'
  },
  //申请成为师傅
  becomeWorker: () => {
    return ipConFig + 'myApi/applyService'
  },
  // 获取当前用户
  getCurUserInfo: () => {
    return ipConFig + 'myApi/getCurUserInfo'
  },

  // 小程序更新用户
  updateUser: () => {
    return ipConFig + 'myApi/updateUser'
  },

  // 师傅上门服务开始订单
  doorService: () => {
    return ipConFig + 'orderApi/serviceOrder'
  },


  // 师傅操作订单服务完成
  serviceEnd: () => {
    return ipConFig + 'orderApi/serviceEndOrder'
  },

  // 用户验收订单
  orederEnd: () => {
    return ipConFig + 'orderApi/overOrder'
  },

  // 用户验收订单
  orderSubmit: () => {
    return ipConFig + 'orderApi/commentOrder'
  },

  // 根据订单id获取订单详情信息
  getByOrderId: () => {
    return ipConFig + 'orderApi/getOrderByOrderId'
  },

  // 订单支付完成,更改状态
  paydOrder: () => {
    return ipConFig + 'orderApi/paydOrder'
  },

  // 获取产品安装位置
  getProductLocationApi: () => {
    return ipConFig + 'orderApi/getProductLocationAll'
  },

  // 获取产品属性配置
  getProductPropertyApi: () => {
    return ipConFig + 'orderApi/getProductPropertyAll'
  },

  // 小程用户余额充值
  rechargeMoneyApi: () => {
    return ipConFig + 'myApi/rechargeMoney'
  },

  // 充值完更新用户金额
  updateUserMoneyApi: () => {
    return ipConFig + 'myApi/updateUserMoney'
  },
  //下单支付
  payOrderApi: () => {
    return ipConFig + 'orderApi/doWechatPreOrder'
  },

  // 最近所下订单5条
  recentOderApi: () => {
    return ipConFig + 'homeApi/recentOder'
  },

  // 获取房型
  getRoomTypeAllApi: () => {
    return ipConFig + 'orderApi/getRoomTypeAll'
  },

  // 获取户型
  getHouseTypeApi: () => {
    return ipConFig + 'orderApi/getHouseType'
  },

  // 获取产品安装位置
  getSysDicApi: (code) => {
    return ipConFig + 'orderApi/getSysDic/' + code
  },

  // 获取系统定义的默认户型
  getDefaultHouseTypeApi: () => {
    return ipConFig + 'orderApi/getDefaultHouseType'
  },

  // 保存或更新用户的订单方案
  saveOrUpdateProgrammesApi: () => {
    return ipConFig + 'MiniProgramme/saveOrUpdateProgrammes'
  },

  // 获取用户的订单方案
  getUserProgrammesApi: () => {
    return ipConFig + 'orderApi/getUserProgrammes'
  },


  // 获取用户的自己方案和系统方案
  getProgrammeTypeAllApi: () => {
    return ipConFig + 'MiniProgramme/getProgrammeTypeAll'
  },


  // 获取用户选择的方案
  getProgrammesByTypeIdApi: () => {
    return ipConFig + 'MiniProgramme/getProgrammesByTypeId'
  },

  // 预览方案
  reportPdfApi: () => {
    return ipConFig + '/orderApi/reportPdf'
  },

  // getHouseItemById
  getHouseItemByIdApi: () => {
    return ipConFig + '/orderApi/getHouseItemById'
  },

  // 分享方案
  shareProgrammeByIdApi: (id) => {
    return ipConFig + 'orderApi/shareProgrammeById/' + id
  },

  //   saveReportTemplate 保存用户报表模板
  saveReportTemplateApi: () => {
    return ipConFig + 'myApi/saveReportTemplate'
  },

  // delReportTemplate 删除用户报表模板
  delReportTemplateApi: () => {
    return ipConFig + 'myApi/delReportTemplate'
  },

  // getReportTemplatesByUser/{pageNum}/{pageSize}  获取当前登录用户的已有模板列表
  getReportTemplatesByUserApi: (pageNum, pageSize) => {
    return ipConFig + 'myApi/getReportTemplatesByUser/' + pageNum + "/" + pageSize
  },

  //储存户型
  saveMyHouseApi: () => {
    return ipConFig + 'orderApi/saveMyHouse'
  },

  // 新增或更改自定义商品价格
  addOrUpdateCustomPriceItemApi: () => {
    return ipConFig + 'orderApi/addOrUpdateCustomPriceItem'
  },

  //新增或更改自定义价格体系
  addOrUpdateCustomPriceApi: () => {
    return ipConFig + 'orderApi/addOrUpdateCustomPrice'
  },

  // 获取当前用户的产品自定义价格
  getCustomPriceApi: () => {
    return ipConFig + 'orderApi/getCustomPrice'
  },

  //根据自定义价格id获取已有产品自定义价格列表
  getCustomPriceItemsApi: (pageNum, pageSize, id) => {
    return ipConFig + 'orderApi/getCustomPriceItems/' + pageNum + "/" + pageSize + '/' + id
  },


  //删除房间
  delMyHouseApi: () => {
    return ipConFig + 'orderApi/delMyHouse'
  },

  // 转发方案
  forwardProgrammeApi: () => {
    return ipConFig + 'orderApi/forwardProgramme'
  },

  // 共享方案
  shareTogetherProgrammeApi: () => {
    return ipConFig + 'MiniProgramme/shareProgramme'
  },

  // /GlobalParam/getSysConfigInfo
  // 获取系统配置信息
  // 工时
  getSysConfigInfoApi: () => {
    return ipConFig + 'GlobalParamApi/getSysConfigInfo'
  },

  // getMyLocations/1/10 获取我的私有位置列表
  getMyLocationsApi: (pageNum, pageSize) => {
    return ipConFig + 'myApi/getMyLocations/' + pageNum + "/" + pageSize
  },

  getPrivateProductByClassIdApi: () => {
    return ipConFig + 'myApi/getPrivateProductByClassId'
  },

  // saveMyLocation 保存更新用户私有位置
  saveMyLocationApi: () => {
    return ipConFig + 'myApi/saveMyLocation'
  },

  // delMyLocation 删除私有位置
  delMyLocationApi: () => {
    return ipConFig + 'myApi/delMyLocation'
  },

  ///GlobalParam/getProductLocationAll
  getProductLocationAllApi: () => {
    return ipConFig + 'GlobalParamApi/getProductLocationAll'
  },

  //获取系统服务类型
  getServiceTypesApi: () => {
    return ipConFig + 'MiniProgramme/getServiceTypes'
  },

  // 用户加入私有产品
  addOrUpdateProductForPrivateApi: () => {
    return ipConFig + 'myApi/addOrUpdateProductForPrivate'
  },

  // 查询当前用户私有产品
  listPrivateProductApi: (pageNum, pageSize) => {
    return ipConFig + 'orderApi/listPrivateProduct/' + pageNum + "/" + pageSize
  },

  // 用户删除私有产品
  deletePrivateProductApi: () => {
    return ipConFig + 'myApi/deletePrivateProduct'
  },

  // 删除共享方案
  delShareRecordByIdApi: () => {
    return ipConFig + 'MiniProgramme/delShareRecordById '
  },

  // 查询方案列表
  getProgrammesByTypeIdForSimpleApi: () => {
    return ipConFig + 'MiniProgramme/getProgrammesByTypeIdForSimple '
  },

  //根据方案id查询该方案
  // MiniProgramme/getVoProgrammeById/{id} 获取方案根据id
  getVoProgrammeByIdApi: (id) => {
    return ipConFig + 'MiniProgramme/getVoProgrammeById/' + id
  },

  // 消息推送
  testMessageApi: () => {
    return ipConFig + 'MiniProgramme/testMessage'
  },

  //  商城对接-查询商城订单
  mallOrderListApi: (pageNum, pageSize) => {
    return ipConFig + 'MallOrderApi/mallOrderList/' + pageNum + "/" + pageSize
  },

  // MallOrderApi/mallOrderAfterList/1/10/5 查询商城售后订单
  mallOrderAfterListApi: (pageNum, pageSize, status) => {
    return ipConFig + 'MallOrderApi/mallOrderAfterList/' + pageNum + "/" + pageSize + "/" + status
  },

  // MallOrderApi/saveOrUpdateAfterOrder 申请售后表单接口
  saveOrUpdateAfterOrderApi: () => {
    return ipConFig + 'MallOrderApi/saveOrUpdateAfterOrder'
  },

  // 售后订单支付
  payMallOrderApi: () => {
    return ipConFig + 'MallOrderApi/payMallOrder'
  },

  // 按键面板图片
  getSysDicSwitchModelApi: () => {
    return ipConFig + 'GlobalParamApi/getSysDicSwitchModel'
  },


}

module.exports = {
  indexApi
}